// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_MST_CUSTOMER
// * CreateDate    : 2014-06-05 18:30:14
// * Creater       : CodeSmith
// * LastChangeDate: 2014-06-05 18:30:14
// * LastChanger   : 2014-06-05 18:30:14
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using System.Runtime.Serialization;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;
using ESOL.Common;

namespace ESOL.Common.Entity
{
    [DataContract]
	[Serializable]
	public partial class MstCustomerEntity : EntityBase
    {
        public MstCustomerTable TableSchema
        {
            get
            {
                return MstCustomerTable.Current;
            }
		}
		
		public MstCustomerEntity()
        {

        }
		
		public MstCustomerEntity(DataRow dr)
        {
			if(dr == null)
			{
				return;
			}
			this.Id = Convert.ToString(CommonFunctions.ToObject(dr["ID"]));
			this.UpdatedBy = Convert.ToString(CommonFunctions.ToObject(dr["UPDATED_BY"]));
			this.UpdatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["UPDATED_DATE"]));
			this.CreatedBy = Convert.ToString(CommonFunctions.ToObject(dr["CREATED_BY"]));
			this.CreatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["CREATED_DATE"]));
			this.IsActive = Convert.ToInt32(CommonFunctions.ToObject(dr["IS_ACTIVE"]));
			this.CustomerCode = Convert.ToString(CommonFunctions.ToObject(dr["CUSTOMER_CODE"]));
			this.CustomerName = Convert.ToString(CommonFunctions.ToObject(dr["CUSTOMER_NAME"]));
			this.CustomerFullName = Convert.ToString(CommonFunctions.ToObject(dr["CUSTOMER_FULL_NAME"]));
			this.IndustryTypeCode = Convert.ToString(CommonFunctions.ToObject(dr["INDUSTRY_TYPE_CODE"]));
			this.Level = Convert.ToString(CommonFunctions.ToObject(dr["LEVEL"]));
			this.ContactDepartment = Convert.ToString(CommonFunctions.ToObject(dr["CONTACT_DEPARTMENT"]));
			this.ContactName = Convert.ToString(CommonFunctions.ToObject(dr["CONTACT_NAME"]));
			this.ContactMobilePhone = Convert.ToString(CommonFunctions.ToObject(dr["CONTACT_MOBILE_PHONE"]));
			this.ContactAge = Convert.ToInt32(CommonFunctions.ToObject(dr["CONTACT_AGE"]));
			this.ContactJobTitle = Convert.ToString(CommonFunctions.ToObject(dr["CONTACT_JOB_TITLE"]));
			this.ContactOfficePhone = Convert.ToString(CommonFunctions.ToObject(dr["CONTACT_OFFICE_PHONE"]));
			this.ContactFax = Convert.ToString(CommonFunctions.ToObject(dr["CONTACT_FAX"]));
			this.ContactEmail = Convert.ToString(CommonFunctions.ToObject(dr["CONTACT_EMAIL"]));
			this.ContactRemark = Convert.ToString(CommonFunctions.ToObject(dr["CONTACT_REMARK"]));
			this.Countory = Convert.ToString(CommonFunctions.ToObject(dr["COUNTORY"]));
			this.Province = Convert.ToString(CommonFunctions.ToObject(dr["PROVINCE"]));
			this.City = Convert.ToString(CommonFunctions.ToObject(dr["CITY"]));
			this.Address = Convert.ToString(CommonFunctions.ToObject(dr["ADDRESS"]));
			this.ZipCode = Convert.ToString(CommonFunctions.ToObject(dr["ZIP_CODE"]));
			this.Email = Convert.ToString(CommonFunctions.ToObject(dr["EMAIL"]));
			this.Telephone = Convert.ToString(CommonFunctions.ToObject(dr["TELEPHONE"]));
			this.Fax = Convert.ToString(CommonFunctions.ToObject(dr["FAX"]));
			this.DefaultCurrency = Convert.ToString(CommonFunctions.ToObject(dr["DEFAULT_CURRENCY"]));
			this.Bank = Convert.ToString(CommonFunctions.ToObject(dr["BANK"]));
			this.BankAccount = Convert.ToString(CommonFunctions.ToObject(dr["BANK_ACCOUNT"]));
			this.TaxAccount = Convert.ToString(CommonFunctions.ToObject(dr["TAX_ACCOUNT"]));
			this.LegalRepresentative = Convert.ToString(CommonFunctions.ToObject(dr["LEGAL_REPRESENTATIVE"]));
			this.LegalAgent = Convert.ToString(CommonFunctions.ToObject(dr["LEGAL_AGENT"]));
			this.ReceivedPerson = Convert.ToString(CommonFunctions.ToObject(dr["RECEIVED_PERSON"]));
			this.ReceivedAddress = Convert.ToString(CommonFunctions.ToObject(dr["RECEIVED_ADDRESS"]));
			this.CreditLimit = Convert.ToString(CommonFunctions.ToObject(dr["CREDIT_LIMIT"]));
			this.PaymentType = Convert.ToString(CommonFunctions.ToObject(dr["PAYMENT_TYPE"]));
			this.Status = Convert.ToString(CommonFunctions.ToObject(dr["STATUS"]));
        }
		
		public MstCustomerEntity(DataRowView dr)
        {
			if(dr == null)
			{
				return;
			}
			this.Id = Convert.ToString(CommonFunctions.ToObject(dr["ID"]));
			this.UpdatedBy = Convert.ToString(CommonFunctions.ToObject(dr["UPDATED_BY"]));
			this.UpdatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["UPDATED_DATE"]));
			this.CreatedBy = Convert.ToString(CommonFunctions.ToObject(dr["CREATED_BY"]));
			this.CreatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["CREATED_DATE"]));
			this.IsActive = Convert.ToInt32(CommonFunctions.ToObject(dr["IS_ACTIVE"]));
			this.CustomerCode = Convert.ToString(CommonFunctions.ToObject(dr["CUSTOMER_CODE"]));
			this.CustomerName = Convert.ToString(CommonFunctions.ToObject(dr["CUSTOMER_NAME"]));
			this.CustomerFullName = Convert.ToString(CommonFunctions.ToObject(dr["CUSTOMER_FULL_NAME"]));
			this.IndustryTypeCode = Convert.ToString(CommonFunctions.ToObject(dr["INDUSTRY_TYPE_CODE"]));
			this.Level = Convert.ToString(CommonFunctions.ToObject(dr["LEVEL"]));
			this.ContactDepartment = Convert.ToString(CommonFunctions.ToObject(dr["CONTACT_DEPARTMENT"]));
			this.ContactName = Convert.ToString(CommonFunctions.ToObject(dr["CONTACT_NAME"]));
			this.ContactMobilePhone = Convert.ToString(CommonFunctions.ToObject(dr["CONTACT_MOBILE_PHONE"]));
			this.ContactAge = Convert.ToInt32(CommonFunctions.ToObject(dr["CONTACT_AGE"]));
			this.ContactJobTitle = Convert.ToString(CommonFunctions.ToObject(dr["CONTACT_JOB_TITLE"]));
			this.ContactOfficePhone = Convert.ToString(CommonFunctions.ToObject(dr["CONTACT_OFFICE_PHONE"]));
			this.ContactFax = Convert.ToString(CommonFunctions.ToObject(dr["CONTACT_FAX"]));
			this.ContactEmail = Convert.ToString(CommonFunctions.ToObject(dr["CONTACT_EMAIL"]));
			this.ContactRemark = Convert.ToString(CommonFunctions.ToObject(dr["CONTACT_REMARK"]));
			this.Countory = Convert.ToString(CommonFunctions.ToObject(dr["COUNTORY"]));
			this.Province = Convert.ToString(CommonFunctions.ToObject(dr["PROVINCE"]));
			this.City = Convert.ToString(CommonFunctions.ToObject(dr["CITY"]));
			this.Address = Convert.ToString(CommonFunctions.ToObject(dr["ADDRESS"]));
			this.ZipCode = Convert.ToString(CommonFunctions.ToObject(dr["ZIP_CODE"]));
			this.Email = Convert.ToString(CommonFunctions.ToObject(dr["EMAIL"]));
			this.Telephone = Convert.ToString(CommonFunctions.ToObject(dr["TELEPHONE"]));
			this.Fax = Convert.ToString(CommonFunctions.ToObject(dr["FAX"]));
			this.DefaultCurrency = Convert.ToString(CommonFunctions.ToObject(dr["DEFAULT_CURRENCY"]));
			this.Bank = Convert.ToString(CommonFunctions.ToObject(dr["BANK"]));
			this.BankAccount = Convert.ToString(CommonFunctions.ToObject(dr["BANK_ACCOUNT"]));
			this.TaxAccount = Convert.ToString(CommonFunctions.ToObject(dr["TAX_ACCOUNT"]));
			this.LegalRepresentative = Convert.ToString(CommonFunctions.ToObject(dr["LEGAL_REPRESENTATIVE"]));
			this.LegalAgent = Convert.ToString(CommonFunctions.ToObject(dr["LEGAL_AGENT"]));
			this.ReceivedPerson = Convert.ToString(CommonFunctions.ToObject(dr["RECEIVED_PERSON"]));
			this.ReceivedAddress = Convert.ToString(CommonFunctions.ToObject(dr["RECEIVED_ADDRESS"]));
			this.CreditLimit = Convert.ToString(CommonFunctions.ToObject(dr["CREDIT_LIMIT"]));
			this.PaymentType = Convert.ToString(CommonFunctions.ToObject(dr["PAYMENT_TYPE"]));
			this.Status = Convert.ToString(CommonFunctions.ToObject(dr["STATUS"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return MstCustomerTable.Current;
            }
        }
		
		#region Perporty List
        [DataMember]
        public string Id
        {
            get { return Convert.ToString(GetData(MstCustomerTable.C_ID)); }
            set { SetData(MstCustomerTable.C_ID, value); }
        }
		
        [DataMember]
        public string UpdatedBy
        {
            get { return Convert.ToString(GetData(MstCustomerTable.C_UPDATED_BY)); }
            set { SetData(MstCustomerTable.C_UPDATED_BY, value); }
        }
		
        [DataMember]
        public DateTime UpdatedDate
        {
            get { return Convert.ToDateTime(GetData(MstCustomerTable.C_UPDATED_DATE)); }
            set { SetData(MstCustomerTable.C_UPDATED_DATE, value); }
        }
		
        [DataMember]
        public string CreatedBy
        {
            get { return Convert.ToString(GetData(MstCustomerTable.C_CREATED_BY)); }
            set { SetData(MstCustomerTable.C_CREATED_BY, value); }
        }
		
        [DataMember]
        public DateTime CreatedDate
        {
            get { return Convert.ToDateTime(GetData(MstCustomerTable.C_CREATED_DATE)); }
            set { SetData(MstCustomerTable.C_CREATED_DATE, value); }
        }
		
        [DataMember]
        public int IsActive
        {
            get { return Convert.ToInt32(GetData(MstCustomerTable.C_IS_ACTIVE)); }
            set { SetData(MstCustomerTable.C_IS_ACTIVE, value); }
        }
		
        [DataMember]
        public string CustomerCode
        {
            get { return Convert.ToString(GetData(MstCustomerTable.C_CUSTOMER_CODE)); }
            set { SetData(MstCustomerTable.C_CUSTOMER_CODE, value); }
        }
		
        [DataMember]
        public string CustomerName
        {
            get { return Convert.ToString(GetData(MstCustomerTable.C_CUSTOMER_NAME)); }
            set { SetData(MstCustomerTable.C_CUSTOMER_NAME, value); }
        }
		
        [DataMember]
        public string CustomerFullName
        {
            get { return Convert.ToString(GetData(MstCustomerTable.C_CUSTOMER_FULL_NAME)); }
            set { SetData(MstCustomerTable.C_CUSTOMER_FULL_NAME, value); }
        }
		
        [DataMember]
        public string IndustryTypeCode
        {
            get { return Convert.ToString(GetData(MstCustomerTable.C_INDUSTRY_TYPE_CODE)); }
            set { SetData(MstCustomerTable.C_INDUSTRY_TYPE_CODE, value); }
        }
		
        [DataMember]
        public string Level
        {
            get { return Convert.ToString(GetData(MstCustomerTable.C_LEVEL)); }
            set { SetData(MstCustomerTable.C_LEVEL, value); }
        }
		
        [DataMember]
        public string ContactDepartment
        {
            get { return Convert.ToString(GetData(MstCustomerTable.C_CONTACT_DEPARTMENT)); }
            set { SetData(MstCustomerTable.C_CONTACT_DEPARTMENT, value); }
        }
		
        [DataMember]
        public string ContactName
        {
            get { return Convert.ToString(GetData(MstCustomerTable.C_CONTACT_NAME)); }
            set { SetData(MstCustomerTable.C_CONTACT_NAME, value); }
        }
		
        [DataMember]
        public string ContactMobilePhone
        {
            get { return Convert.ToString(GetData(MstCustomerTable.C_CONTACT_MOBILE_PHONE)); }
            set { SetData(MstCustomerTable.C_CONTACT_MOBILE_PHONE, value); }
        }
		
        [DataMember]
        public int ContactAge
        {
            get { return Convert.ToInt32(GetData(MstCustomerTable.C_CONTACT_AGE)); }
            set { SetData(MstCustomerTable.C_CONTACT_AGE, value); }
        }
		
        [DataMember]
        public string ContactJobTitle
        {
            get { return Convert.ToString(GetData(MstCustomerTable.C_CONTACT_JOB_TITLE)); }
            set { SetData(MstCustomerTable.C_CONTACT_JOB_TITLE, value); }
        }
		
        [DataMember]
        public string ContactOfficePhone
        {
            get { return Convert.ToString(GetData(MstCustomerTable.C_CONTACT_OFFICE_PHONE)); }
            set { SetData(MstCustomerTable.C_CONTACT_OFFICE_PHONE, value); }
        }
		
        [DataMember]
        public string ContactFax
        {
            get { return Convert.ToString(GetData(MstCustomerTable.C_CONTACT_FAX)); }
            set { SetData(MstCustomerTable.C_CONTACT_FAX, value); }
        }
		
        [DataMember]
        public string ContactEmail
        {
            get { return Convert.ToString(GetData(MstCustomerTable.C_CONTACT_EMAIL)); }
            set { SetData(MstCustomerTable.C_CONTACT_EMAIL, value); }
        }
		
        [DataMember]
        public string ContactRemark
        {
            get { return Convert.ToString(GetData(MstCustomerTable.C_CONTACT_REMARK)); }
            set { SetData(MstCustomerTable.C_CONTACT_REMARK, value); }
        }
		
        [DataMember]
        public string Countory
        {
            get { return Convert.ToString(GetData(MstCustomerTable.C_COUNTORY)); }
            set { SetData(MstCustomerTable.C_COUNTORY, value); }
        }
		
        [DataMember]
        public string Province
        {
            get { return Convert.ToString(GetData(MstCustomerTable.C_PROVINCE)); }
            set { SetData(MstCustomerTable.C_PROVINCE, value); }
        }
		
        [DataMember]
        public string City
        {
            get { return Convert.ToString(GetData(MstCustomerTable.C_CITY)); }
            set { SetData(MstCustomerTable.C_CITY, value); }
        }
		
        [DataMember]
        public string Address
        {
            get { return Convert.ToString(GetData(MstCustomerTable.C_ADDRESS)); }
            set { SetData(MstCustomerTable.C_ADDRESS, value); }
        }
		
        [DataMember]
        public string ZipCode
        {
            get { return Convert.ToString(GetData(MstCustomerTable.C_ZIP_CODE)); }
            set { SetData(MstCustomerTable.C_ZIP_CODE, value); }
        }
		
        [DataMember]
        public string Email
        {
            get { return Convert.ToString(GetData(MstCustomerTable.C_EMAIL)); }
            set { SetData(MstCustomerTable.C_EMAIL, value); }
        }
		
        [DataMember]
        public string Telephone
        {
            get { return Convert.ToString(GetData(MstCustomerTable.C_TELEPHONE)); }
            set { SetData(MstCustomerTable.C_TELEPHONE, value); }
        }
		
        [DataMember]
        public string Fax
        {
            get { return Convert.ToString(GetData(MstCustomerTable.C_FAX)); }
            set { SetData(MstCustomerTable.C_FAX, value); }
        }
		
        [DataMember]
        public string DefaultCurrency
        {
            get { return Convert.ToString(GetData(MstCustomerTable.C_DEFAULT_CURRENCY)); }
            set { SetData(MstCustomerTable.C_DEFAULT_CURRENCY, value); }
        }
		
        [DataMember]
        public string Bank
        {
            get { return Convert.ToString(GetData(MstCustomerTable.C_BANK)); }
            set { SetData(MstCustomerTable.C_BANK, value); }
        }
		
        [DataMember]
        public string BankAccount
        {
            get { return Convert.ToString(GetData(MstCustomerTable.C_BANK_ACCOUNT)); }
            set { SetData(MstCustomerTable.C_BANK_ACCOUNT, value); }
        }
		
        [DataMember]
        public string TaxAccount
        {
            get { return Convert.ToString(GetData(MstCustomerTable.C_TAX_ACCOUNT)); }
            set { SetData(MstCustomerTable.C_TAX_ACCOUNT, value); }
        }
		
        [DataMember]
        public string LegalRepresentative
        {
            get { return Convert.ToString(GetData(MstCustomerTable.C_LEGAL_REPRESENTATIVE)); }
            set { SetData(MstCustomerTable.C_LEGAL_REPRESENTATIVE, value); }
        }
		
        [DataMember]
        public string LegalAgent
        {
            get { return Convert.ToString(GetData(MstCustomerTable.C_LEGAL_AGENT)); }
            set { SetData(MstCustomerTable.C_LEGAL_AGENT, value); }
        }
		
        [DataMember]
        public string ReceivedPerson
        {
            get { return Convert.ToString(GetData(MstCustomerTable.C_RECEIVED_PERSON)); }
            set { SetData(MstCustomerTable.C_RECEIVED_PERSON, value); }
        }
		
        [DataMember]
        public string ReceivedAddress
        {
            get { return Convert.ToString(GetData(MstCustomerTable.C_RECEIVED_ADDRESS)); }
            set { SetData(MstCustomerTable.C_RECEIVED_ADDRESS, value); }
        }
		
        [DataMember]
        public string CreditLimit
        {
            get { return Convert.ToString(GetData(MstCustomerTable.C_CREDIT_LIMIT)); }
            set { SetData(MstCustomerTable.C_CREDIT_LIMIT, value); }
        }
		
        [DataMember]
        public string PaymentType
        {
            get { return Convert.ToString(GetData(MstCustomerTable.C_PAYMENT_TYPE)); }
            set { SetData(MstCustomerTable.C_PAYMENT_TYPE, value); }
        }
		
        [DataMember]
        public string Status
        {
            get { return Convert.ToString(GetData(MstCustomerTable.C_STATUS)); }
            set { SetData(MstCustomerTable.C_STATUS, value); }
        }
		
		#endregion
	}
	
	
}	

